package com.itheima.service.impl;

import com.itheima.dao.UserMapper;
import com.itheima.dao.User_AuthorityMapper;
import com.itheima.model.domain.User_Authority;
import com.itheima.service.IUser_AuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class User_AuthorityServiceImpl implements IUser_AuthorityService {
    @Autowired
    private User_AuthorityMapper user_authorityMapper;

    @Autowired
    private UserMapper userMapper;

    @Override
    public void publish(User_Authority user_authority){
        user_authority.setAuthorityid(2);
//        userMapper.insertUser(user);
        user_authorityMapper.insertAuthority_id(user_authority);
    }
}
